package com.crazyant;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.ImageButton;
import android.support.v4.app.NavUtils;

public class Mundo2 extends Activity {

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_mundo2);
        
        ImageButton pantalla1 = (ImageButton) findViewById(R.id.pantalla21);
		pantalla1.setOnClickListener(new View.OnClickListener() {

			public void onClick(View v) {
				Intent i = new Intent("com.crazyant.GAME11LAYOUT");
				startActivity(i);
				finish();
			}
		});
		
		
		ImageButton pantalla2 = (ImageButton) findViewById(R.id.pantalla22);
		if(GV.BBDD.mundo >= 1 && GV.BBDD.pant <= 1) pantalla2.setEnabled(false);
		else {
			pantalla2.setOnClickListener(new View.OnClickListener() {
	
				public void onClick(View v) {
					Intent i = new Intent("com.crazyant.GAME11LAYOUT");
					startActivity(i);
					finish();
				}
			});
		}
		
		ImageButton pantalla3 = (ImageButton) findViewById(R.id.pantalla23);
		if(GV.BBDD.mundo >= 1 && GV.BBDD.pant <= 2) pantalla3.setEnabled(false);
		else {
			pantalla3.setOnClickListener(new View.OnClickListener() {
	
				public void onClick(View v) {
					Intent i = new Intent("com.crazyant.GAME11LAYOUT");
					startActivity(i);
					finish();
				}
			});
		}
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.activity_mundo2, menu);
        return true;
    }

    
}
